package com.online.service;

import com.online.entity.Teacher;

import java.util.List;

public interface TeacherService {

    /**
     * 根据worKNumber查询教师基本信息
     * @param workNumber
     * @return
     */
    Teacher showATeacher(String workNumber);

    /**
     * 查询当前老师的状态
     * @param workNumber
     * @return
     */
    Integer showStatusByWorkNumber(String workNumber);

    /**
     * 依靠teacherId查询一条老师的信息
     * @param teacherId
     * @return
     */
    Teacher showATeacher(Integer teacherId);

    /**
     * 更新用户的信息
     * @param teacherId
     * @return
     */
    int updateTeacher(Integer teacherId,String userName,String password,String email);

    /**
     * 教师注册
     * @param workNumber
     * @param password
     * @param email
     * @return
     */
    int insertATeacher(String workNumber,String password,String email);

    /**
     * 显示所有的教师信息
     * @return
     */
    List<Teacher> showAllTeacherInfo();

    /**
     * 禁用或者解冻一个教师
     * @return
     */
    int updateTeacherStatus(Integer teacherId,Integer status);

    /**
     * 查询教师是否被注册
     * @param email
     * @return
     */
    Boolean findTeacherByEmail(String email);

    /**
     * 更新密码
     * 成功返回true，否则返回false
     * @param email
     * @param password
     * @return
     */
    Boolean updatePassword(String email,String password);
}
